#pragma once

#ifndef _CTRADE_H_
#define _CTRADE_H_

#include "CChar.h"
#include "CItemContainer.h"

class CTrade {
public:
	CTrade();
	~CTrade();

	void setId(unsigned int newId);
	unsigned int getId();

	CChar * getChar1();
	void setChar1(CChar * schar);
	CChar * getChar2();
	void setChar2(CChar * schar);

	void accepted(CChar * schar, bool accept);
	bool isAccepted(CChar * schar);

	CTradeContainer * CTrade::getTradeCont1();
	CTradeContainer * CTrade::getTradeCont2();

	void updateTradeCont1(unsigned char slotID, unsigned char invSlotID, unsigned short itemID, unsigned long quantity);
	void updateTradeCont2(unsigned char slotID, unsigned char invSlotID, unsigned short itemID, unsigned long quantity);

private:
	unsigned int m_id;

	CChar * m_pChar1;
	CChar * m_pChar2;

	bool m_char1Accepted;
	bool m_char2Accepted;

	CTradeContainer * m_pTradeCont1;
	CTradeContainer * m_pTradeCont2;
};

#endif